import axios from "axios";
import { loginreq, req, reqGet } from "./axiosFun";

// 登录接口
export const login = params => {
  return loginreq("POST", "/login", params);
};

//查询用户
export const getAdminList = params => {
  return req("POST", "/getAdminList", params);
};

//添加用户
export const addAdmin = params => {
  return req("POST", "/addAdmin", params);
};

//修改用户
export const upAdmin = params => {
  return req("POST", "/upAdmin", params);
};

//删除用户
export const deleteAdmin = params => {
  return req("POST", "/deleteAdmin", params);
};

//添加栏目页分类
export const addIndex = params => {
  return req("POST", "/addIndex", params);
};

//查询栏目页列表
export const selectIndexs = params => {
  return reqGet("GET", "/selectIndexs", params);
};

//查询栏目页对应的列表
export const selectIndexByTypeId = params => {
  return reqGet("GET", "/selectIndexByTypeIds", params);
};

//轮播图

//添加
export const addCarousels = params => {
  return req("POST", "/addCarousels", params);
};
//查询
export const selectCarouselAlls = params => {
  return reqGet("GET", "/selectCarouselAlls", params);
};
//
export const selectCarouselByIds = params => {
  return reqGet("GET", "/selectCarouselByIds", params);
};

//
export const selectCarouselByIndexIds = params => {
  return reqGet("GET", "/selectCarouselByIndexIds", params);
};

export const addInformations = params => {
  return req("post", "/addInformations", params);
};

//查询学校类型表
export const selectSchoolTypeAlls = params => {
  return reqGet("GET", "/selectSchoolTypeAlls", params);
};

//学校类型添加
export const addSchoolType = params => {
  return req("POST", "/addSchoolType", params);
};
//添加年级
export const addSchoolGrade = params => {
  return req("POST", "/addSchoolGrade", params);
};
//年级列表
export const selectSchoolGradeAlls = params => {
  return reqGet("get", "/selectSchoolGradeAlls", params);
};
//添加网点
export const addOutlets = params => {
  return req("POST", "/addOutlets", params);
};

//查询网点
export const selectOutletsAlls = params => {
  return reqGet("GET", "/selectOutletsAlls", params);
};
//学校列表

//添加学校

export const addSchool = params => {
  return reqGet("POST", "/addSchool", params);
};
//添加教师类别
export const addTeacherType = params => {
  return req("POST", "/addTeacherType", params);
};

//教师类别列表
export const selectTeacherTypes = params => {
  return reqGet("GET", "/selectTeacherTypes", params);
};
//教师列表
export const selectTeachers = params => {
  return reqGet("GET", "/selectTeachers", params);
};
//添加教师
export const addTeacher = params => {
  return req("POST", "/addTeacher", params);
};

//首页课程分类列表

export const addCourse = params => {
  return req("POST", "/addCourse", params);
};
export const addCourseDetails = params => {
  return req("POST", "/addCourseDetails", params);
};
export const updateCourseDetails = params => {
  return req("POST", "/updateCourseDetails", params);
};

//查询所有学院
export const selectSchoolAlls = params => {
  return reqGet("GET", "/selectSchoolAlls", params);
};
//查询学院详情数据全部
export const selectSchoolDetailAlls = params => {
  return reqGet("GET", "/selectSchoolDetailAlls", params);
};
//selectSchoolDetailBySchoolIds
export const selectSchoolDetailBySchoolIds = params => {
  return reqGet("GET", "/selectSchoolDetailBySchoolIds", params);
};

//添加学院详情
export const addSchoolDetails = params => {
  return req("POST", "/addSchoolDetails", params);
};

//查询咨询表
export const selectInformationByIndexIdAndIndexDetailIdAndTypes = params => {
  return reqGet(
    "GET",
    "/selectInformationByIndexIdAndIndexDetailIdAndTypes",
    params
  );
};

//查询课程列表0是首页列表 1是栏目页
export const selectCourseByCategoryTypes = params => {
  return reqGet("GET", "/selectCourseByCategoryTypes", params);
};

export const selectCourseByCategoryTypeISNULLs = params => {
  return reqGet("GET", "/selectCourseByCategoryTypeISNULLs", params);
};

export const selectCourseDetails = params => {
  return reqGet("GET", "/selectCourseDetails", params);
};

//栏目页详情分类新增
export const addIndexDetails = params => {
  return req("POST", "/addIndexDetails", params);
};

//查询栏目页详情分类列表
export const selectIndexDetailByIndexIds = params => {
  return reqGet("GET", "/selectIndexDetailByIndexIds", params);
};

export const deleteSubmits = params => {
  return reqGet("GET", "/deleteSubmits", params);
};
 
//查询栏目页详情分类列表
export const selectSubmits = params => {
  return reqGet("GET", "/selectSubmits", params);
};
//查询文章类型列表数据
export const selectInformationByIndexIdAndTypes = params => {
  return reqGet("GET", "/selectInformationByIndexIdAndTypes", params);
};

//专题页富文本新增
export const addTextTails = params => {
  return req("POST", "/addTextTails", params);
};

//专题页富文本查询
export const selectTextTailByIndexIds = params => {
  return reqGet("get", "/selectTextTailByIndexIds", params);
};
//根据id进行轮播图修改
export const UpdateCarouselByIds = params => {
  return req("POST", "/UpdateCarouselByIds", params);
};

//修改老师
export const updateTeacher = params => {
  return req("POST", "/updateTeacher", params);
};

//学校年级表修改
export const updateSchoolGrade = params => {
  return req("POST", "/updateSchoolGrade", params);
};

//学校类型表修改
export const updateSchoolType = params => {
  return req("POST", "/updateSchoolType", params);
};

export const updateTeacherType = params => {
  return req("POST", "/updateTeacherType", params);
};
//学校修改
export const updateSchool = params => {
  return req("POST", "/updateSchool", params);
};
export const updateOutlets = params => {
  return req("POST", "/updateOutlets", params);
};

export const updateIndex = params => {
  return req("POST", "/updateIndex", params);
};

export const updateCourseByIds = params => {
  return req("POST", "/updateCourseByIds", params);
};

export const updateIndexDetails = params => {
  return req("POST", "/updateIndexDetails", params);
};

export const updateInformations = params => {
  return req("POST", "/updateInformations", params);
};

export const updateTextTails = params => {
  return req("POST", "/updateTextTails", params);
};
export const updateSchoolDetails = params => {
  return req("POST", "/updateSchoolDetails", params);
};

//删除

export const DeleteCarouselByIds = params => {
  return reqGet("GET", "/DeleteCarouselByIds", params);
};

export const deleteSchoolDetailByIds = params => {
  return reqGet("GET", "/deleteSchoolDetailByIds", params);
};

export const deleteSchoolByIds = params => {
  return reqGet("GET", "/deleteSchoolByIds", params);
};

export const deleteOutletsByIds = params => {
  return reqGet("GET", "/deleteOutletsByIds", params);
};

export const deleteSchoolTypeByIds = params => {
  return reqGet("GET", "/deleteSchoolTypeByIds", params);
};

export const deleteSchoolGradeByIds = params => {
  return reqGet("GET", "/deleteSchoolGradeByIds", params);
};

export const deleteTeacherTypeByIds = params => {
  return reqGet("GET", "/deleteTeacherTypeByIds", params);
};

export const deleteTeacherByIds = params => {
  return reqGet("GET", "/deleteTeacherByIds", params);
};

export const deleteCourse = params => {
  return req("POST", "/deleteCourse", params);
};

export const deleteIndexByIds = params => {
  return reqGet("GET", "/deleteIndexByIds", params);
};
export const deleteCourseDetailByIds = params => {
  return reqGet("GET", "/deleteCourseDetailByIds", params);
};
export const deleteIndexDetailByIds = params => {
  return reqGet("GET", "/deleteIndexDetailByIds", params);
};

export const deleteInformationByIds = params => {
  return reqGet("GET", "/deleteInformationByIds", params);
};

// 添加服务跳转
export const addJumps = params => {
  return req("POST", "/addJumps", params);
};
// 根据ID删除服务跳转
export const DeleteJumpByIds = params => {
  return reqGet("GET", "/DeleteJumpByIds", params);
};
// 查询服务跳转表
export const selectJumpAlls = params => {
  return reqGet("GET", "/selectJumpAlls", params);
};
// 根据type 查询服务跳转表
export const selectJumpByTypes = params => {
  return reqGet("GET", "/selectJumpByTypes", params);
};
// 根据id修改服务跳转
export const updateJumps = params => {
  return req("POST", "/updateJumps", params);
};

export const addQrcodes = params => {
  return req("POST", "/addQrcodes", params);
};
export const UpdateQrcodeByIds = params => {
  return req("POST", "/UpdateQrcodeByIds", params);
};
export const selectQrcodeAlls = params => {
  return reqGet("GET", "/selectQrcodeAlls", params);
};

export const DeleteQrcodeByIds = params => {
  return reqGet("GET", "/DeleteQrcodeByIds", params);
};

export const addLinks = params => {
  return req("POST", "/addLinks", params);
};

export const deleteLinkByIds = params => {
  return reqGet("GET", "/deleteLinkByIds", params);
};

export const updateLinks = params => {
  return req("POST", "/updateLinks", params);
};

export const selectLinkAlls = params => {
  return reqGet("GET", "/selectLinkAlls", params);
};



export const selectCarltonAlls = params => {
  return reqGet("GET", "/selectCarltonAlls", params);
};
export const DeleteCarltonByIds = params => {
  return reqGet("GET", "/DeleteCarltonByIds", params);
};
export const addCarltons = params => {
  return req("POST", "/addCarltons", params);
};

export const UpdateCarltonByIds = params => {
  return req("POST", "/UpdateCarltonByIds", params);
};

// 资讯表管理
// 查询资讯表
export const selectInfos = params => {
  return reqGet("GET", "/selectInfos", params);
};
// 添加资讯表
export const addInfos = params => {
  return req("POST", "/addInfos", params);
};
// 根据Id删除资讯表
export const deleteInfoByIds = params => {
  return reqGet("GET", "/deleteInfoByIds", params);
};
// 修改资讯表
export const updateInfos = params => {
  return req("POST", "/updateInfos", params);
};

// 资讯类别表管理
// 查询资讯表
export const selectInfoTypes = params => {
  return reqGet("GET", "/selectInfoTypes", params);
};
// 添加资讯类别表
export const addInfoTypes = params => {
  return req("POST", "/addInfoTypes", params);
};
// 根据Id删除资讯类别表
export const deleteInfoTypeByIds = params => {
  return reqGet("GET", "/deleteInfoTypeByIds", params);
};
// 修改资讯类别表
export const updateInfoTypes = params => {
  return req("POST", "/updateInfoTypes", params);
};